<template>
  <div class="dashboard-container">
    <Card />
    <Sale />
    <Observe />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
// 引入Card组件
import Card from './Card'
// 引入Sale组件
import Sale from './Sale'
// 引入Observe组件
import Observe from './Observe'

export default {
  name: 'Dashboard',
  data () {
    return {
      mockData: []
    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  components: {
    Card,
    Sale,
    Observe
  },
  mounted () {
    this.mockData = this.$store.dispatch('home/getDate')
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 20px 0;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
